﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using FluentValidation;
using CashFlow.Admin.Models;

namespace CashFlow.Admin.Validator
{
    public class ResetAdminPwdModelValidator : AbstractValidator<ResetAdminPwdModel>
    {
        public ResetAdminPwdModelValidator()
        {
            RuleFor(x => x.Pwd).Matches("\\w{6,20}").WithMessage("原密码格式不正确！");
            RuleFor(x => x.NewPwd).Matches("\\w{6,20}").WithMessage("新密码格式不正确！");
            RuleFor(x => x.ConfirmNewPwd).Matches("\\w{6,20}").WithMessage("确认新密码格式不正确！");
        }
    }
}